/*
 * @Author: Leo.wang wanglizhigs@163.com
 * @Date: 2024-09-03 21:58:29
 * @LastEditors: Leo.wang wanglizhigs@163.com
 * @LastEditTime: 2024-09-03 22:49:04
 * @FilePath: /metaverse-manage/app/entity/Contact.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */

import dayjs from 'dayjs';

import { objKeyTransfer, MEANS } from '../utils/convention';
export interface Contact {
  id: number;
  phone: string;
  address: string;
  create_time: string;
  update_time: string;
}


export function initContact(data = {}) {
  const time = dayjs().format('YYYY-MM-DD HH:mm:ss');
  return objKeyTransfer({
    phone: '',
    address: '',
    create_time: time,
    update_time: time,
    ...data,
  }, MEANS.CamelToSnake);
}

export function updateContact(data = {}) {
  const time = dayjs().format('YYYY-MM-DD HH:mm:ss');
  return objKeyTransfer({
    phone: '',
    address: '',
    update_time: time,
    ...data,
  }, MEANS.CamelToSnake);
}
